From 42ee21e34cca476849fbb3cc787255be232e96a0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 11 May 2013 19:44:57 -0400 Subject: [PATCH] Make gtk_window_resize work again This hunk of code was lost by accident in the previous commit. --- gtk/gtkwindow.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index e0d650365a..710497fd8a 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -7897,6 +7897,20 @@ gtk_window_compute_configure_request_size (GtkWindow *window, gtk_window_get_remembered_size (window, width, height); } + /* Override any size with gtk_window_resize() values */ + if (info) + { + if (info->resize_width > 0) + *width = info->resize_width; + if (info->resize_height > 0) + *height = info->resize_height; + + if (info->resize_is_geometry) + geometry_size_to_pixels (geometry, flags, + info->resize_width > 0 ? width : NULL, + info->resize_height > 0 ? height : NULL); + } + /* Don't ever request zero width or height, it's not supported by gdk. The size allocation code will round it to 1 anyway but if we do it then the value returned from this function will is -- 2.30.2